{% import 'apostrophe-ui:components/dropdowns.html' as dropdowns with context -%}
{%- macro listMenu() -%}
  <li href="#" class="apos-dropdown-item" data-apos-create-{{ data.options.name | css }}>{{ __ns('apostrophe', 'New %s', __ns('apostrophe', data.options.label)) }}</li>
  <li href="#" class="apos-dropdown-item" data-apos-manage-{{ data.options.name | css }}>{{ __ns('apostrophe', 'Manage %s', __ns('apostrophe', data.options.pluralLabel)) }}</li>
  {%- if data.options.import -%}
    <li href="#" class="apos-dropdown-item" data-apos-import-{{ data.options.name | css }}>{{ __ns('apostrophe', 'Import %s', __ns('apostrophe', data.options.pluralLabel) ) }}</li>
    {%- if data.options.export -%}
      <li href="#" class="apos-dropdown-item" data-apos-export-{{ data.options.name | css }}>{{ __ns('apostrophe', 'Export %s', __ns('apostrophe', data.options.pluralLabel) ) }}</li>
    {%- endif -%}
  {%- endif -%}
{%- endmacro -%}
{%- if data.permissions.edit -%}
  <div class="apos-admin-bar-item">
    <div class="apos-admin-bar-item">
      {{ dropdowns.base({
        label: data.options.pluralLabel,
        items: [
          { label: 'One of the things', link: '#', action: 'data-something' },
          { label: 'Another Stuff', link: '#', action: 'data-something' },
          { label: 'OKAY', link: '#', action: 'data-something' }
        ]}, 'admin', { direction: 'down', listMacro: listMenu }
      ) }}
    </div>
  </div>
{%- endif -%}
